package com.atguigu.eduservice.client;

import common.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 将调用的服务接口在此定义
 */
@Component
@FeignClient(name = "service-vod" ,fallback = vodFileDegradeFeignCliet.class)
//@FeignClient注解用于指定从哪个服务中调用功能 ，名称与被调用的服务名保持一致。
public interface VodClient {
    //调用service_vod删除单个视频方法
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")//全路径
    public R removeAlyVideo(@PathVariable("id") String id);

    //删除多个阿里云视频
    //删除多个视频id List<String> videoIdList
    @RequestMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);

}
